package net.jeeshop.services.front.bbs.impl;

import net.jeeshop.core.ServersManager;
import net.jeeshop.services.front.bbs.BbsDetailService;
import net.jeeshop.services.front.bbs.bean.BbsDetail;
import net.jeeshop.services.front.bbs.bean.BbsImg;
import net.jeeshop.services.front.bbs.dao.BbsDetailDao;
import net.jeeshop.services.front.bbs.dto.BbsDetailDTO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by zuohao on 16/7/7.
 */
@Service("bbsDetailServiceFront")
public class BbsDetailServiceImpl extends ServersManager<BbsDetail, BbsDetailDao> implements BbsDetailService {

    @Resource(name="bbsDetailDaoFront")
    @Override
    public void setDao(BbsDetailDao bbsDetailDao) {
        this.dao=bbsDetailDao;
    }


    @Override
    public List selectBbsDetailList(Map<String,Object> map) {
        return dao.selectBbsDetailList(map);
    }

    @Override
    public int selectBbsDetailCountList(Map<String,Object> map) {
        return dao.selectBbsDetailCountList(map);
    }

    @Override
    public void insertBbsDetail(BbsDetail bbsDetail) {
        dao.insertBbsDetail(bbsDetail);
    }

    @Override
    public int deleteBbsDetailById(Map map) {
        return dao.deleteBbsDetailById(map);
    }

    @Override
    public void insertBbsImage(BbsImg bbsImg) {
        dao.insertBbsImage(bbsImg);

    }

    @Override
    public List<BbsImg> selectBbsImage(String id) {
        return dao.selectBbsImage(id);
    }

    @Override
    public BbsDetailDTO selectBbsDetail(BbsDetail bbsDetail) {
        return dao.selectBbsDetail(bbsDetail);
    }
}
